<html>
<head><meta charset="utf-8"><title>space-separated lists · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html">space-separated lists</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="160815813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160815813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160815813">(Mar 14 2019 at 19:47)</a>:</h4>
<p>I'm looking at adding a <code>-Z allow-features=x,y,z</code> command-line flag to the compiler, and it looks like all the list options like this are space-separated</p>



<a name="160815923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160815923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160815923">(Mar 14 2019 at 19:48)</a>:</h4>
<p>unfortunately, I can't figure out a way to put a space inside a command line option in my test <code>compile-flags</code></p>



<a name="160815982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160815982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160815982">(Mar 14 2019 at 19:49)</a>:</h4>
<p>so my question is..<br>
1. is space-separated the right format for an option like this?<br>
2. how the heck do I test this?</p>



<a name="160816096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160816096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160816096">(Mar 14 2019 at 19:50)</a>:</h4>
<p>note that if I specify the option more than once, it overwrites the list rather than appending</p>



<a name="160816115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160816115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160816115">(Mar 14 2019 at 19:50)</a>:</h4>
<p>here's my PR: <a href="https://github.com/rust-lang/rust/issues/59169" target="_blank" title="https://github.com/rust-lang/rust/issues/59169">#59169</a></p>



<a name="160818933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160818933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160818933">(Mar 14 2019 at 20:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> I think <span class="user-mention" data-user-id="121055">@Pietro Albini</span> added a flag that lets you specify arbitrary crate-level attributes</p>



<a name="160818941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160818941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160818941">(Mar 14 2019 at 20:25)</a>:</h4>
<p>so it might be worth just using that instead? I forget the name though</p>



<a name="160818949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160818949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160818949">(Mar 14 2019 at 20:26)</a>:</h4>
<p>crate-attrs perhaps?</p>



<a name="160819018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160819018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160819018">(Mar 14 2019 at 20:26)</a>:</h4>
<p>I think <code>-Zcrate-attr</code></p>



<a name="160819076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160819076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160819076">(Mar 14 2019 at 20:27)</a>:</h4>
<p>Oh, I misinterpreted what the flag does</p>



<a name="160819144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160819144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160819144">(Mar 14 2019 at 20:28)</a>:</h4>
<p>I would maybe think about reworking the flag to be a crate attribute since that's easier to test etc and then just rely on <code>-Z crate-attrs</code> to actually specify it from build systems and the like</p>



<a name="160821686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160821686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160821686">(Mar 14 2019 at 20:58)</a>:</h4>
<p>hmm, adding it as a crate attribute seems more potentially controversial</p>



<a name="160821702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160821702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160821702">(Mar 14 2019 at 20:58)</a>:</h4>
<p>would that require an RFC?</p>



<a name="160822889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160822889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160822889">(Mar 14 2019 at 21:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> ^</p>



<a name="160822924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160822924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160822924">(Mar 14 2019 at 21:12)</a>:</h4>
<p>I think as long as it's unstable I wouldn't expect it to be</p>



<a name="160823009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160823009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160823009">(Mar 14 2019 at 21:13)</a>:</h4>
<p>So one other thing that I might suggest is to perhaps use something like <code>syn</code> to parse your crates and implement this as a tidy-style rule?</p>



<a name="160823301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160823301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160823301">(Mar 14 2019 at 21:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> But in terms of <code>-Z</code> argument I'd personally feel better about comma-sep (features can't have commas in them so should be fairly easy to implement)</p>



<a name="160823662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160823662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160823662">(Mar 14 2019 at 21:21)</a>:</h4>
<p>comma-separated should be easy to test and is what I would have expected personally</p>



<a name="160823709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160823709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160823709">(Mar 14 2019 at 21:22)</a>:</h4>
<p>I just didn't go that route because I couldn't find any other comma-separated options :)</p>



<a name="160823765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160823765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160823765">(Mar 14 2019 at 21:23)</a>:</h4>
<p>Heh</p>



<a name="160823794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160823794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160823794">(Mar 14 2019 at 21:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> I think that might be partially because we just don't have many options</p>



<a name="160823857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160823857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160823857">(Mar 14 2019 at 21:24)</a>:</h4>
<p>OTOH, you could also do "only one feature per option" and then just all the options are joined together (additive)</p>



<a name="160824798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160824798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160824798">(Mar 14 2019 at 21:34)</a>:</h4>
<p>Features are never stable so I would expect the <code>-Z</code> flag to also never be stable</p>



<a name="160824812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160824812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160824812">(Mar 14 2019 at 21:34)</a>:</h4>
<p>(features == the gating mechanism itself and the names we assign in <code>#![feature(&lt;name&gt;)]</code>)</p>



<a name="160826151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160826151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160826151">(Mar 14 2019 at 21:50)</a>:</h4>
<p>okay, I think I'll make it comma-separated then</p>



<a name="160826195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160826195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160826195">(Mar 14 2019 at 21:50)</a>:</h4>
<p>related issue: how do I run the <code>error-index.md</code> doctests</p>



<a name="160826207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/space-separated%20lists/near/160826207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/space-separated.20lists.html#160826207">(Mar 14 2019 at 21:51)</a>:</h4>
<p>I can never remember</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>